home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / fax / src / port / solaris2 / defs.cc next >
Text File  |  1994-08-01  |  9KB  |  325 lines

  1. #    $Header: /usr/people/sam/fax/port/solaris2/RCS/defs.cc,v 1.4 1994/03/29 01:07:14 sam Rel $
  2. #
  3. # FlexFAX Facsimile Software
  4. #
  5. # Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 Sam Leffler
  6. # Copyright (c) 1991, 1992, 1993, 1994 Silicon Graphics, Inc.
  7. # Permission to use, copy, modify, distribute, and sell this software and 
  8. # its documentation for any purpose is hereby granted without fee, provided
  9. # that (i) the above copyright notices and this permission notice appear in
  10. # all copies of the software and related documentation, and (ii) the names of
  11. # Sam Leffler and Silicon Graphics may not be used in any advertising or
  12. # publicity relating to the software without the specific, prior written
  13. # permission of Sam Leffler and Silicon Graphics.
  14. # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  15. # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  16. # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  17. # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
  18. # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
  19. # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  20. # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
  21. # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
  22. # OF THIS SOFTWARE.
  23. #
  24.  
  25. #
  26. # These definitions are for building the software on a SPARC
  27. # under Solaris 2.3 using SunPro's C and C++ compilers.
  28. #
  29. # TARGET:    solaris2
  30. # COMPILER:    cc
  31. #
  32. SHELL    = /bin/sh
  33. DESTDIR    = .
  34. NULL    =
  35. MAKEFILE= Makefile
  36.  
  37. #
  38. # Location of auxiliary stuff needed for Solaris2
  39. #
  40. PORT    = ${DEPTH}/port/solaris2
  41. PORTSVR4= ${DEPTH}/port/svr4
  42. GENERIC    = ${DEPTH}/port/generic
  43. #
  44. # Basic tools used in the build process.
  45. #
  46. C++    = ${TOOLROOT}/opt/SUNWspro/bin/CC
  47. CC    = ${TOOLROOT}/opt/SUNWspro/bin/cc
  48.  
  49. NAWK    = ${TOOLROOT}/usr/bin/nawk
  50. INSTALL    = sh ${PORTSVR4}/install.sh
  51. MKDEPEND= ${GENERIC}/mkdepend
  52. AR    = ${TOOLROOT}/usr/ccs/bin/ar
  53. RANLIB    = ${TOOLROOT}/bin/echo
  54. SED    = ${TOOLROOT}/bin/sed
  55.  
  56. #
  57. # AR options for creating/updating an archive
  58. #
  59. AROPTS=    crs
  60.  
  61. #
  62. # Special options for lptops compilation (yech).
  63. #
  64.  
  65. #
  66. # We wants System V-style getty support.
  67. #
  68. SYSGETTY=GettySysV.c++
  69.  
  70. #
  71. # and we want System V-style UUCP lock support.
  72. #
  73. UUCP_LOCKDIR=/var/spool/locks
  74. UUCP_LOCKTYPE=0
  75. UUCP_LOCKMODE=0444
  76.  
  77. #
  78. # Location of Adobe Font Metrics for lptops.
  79. #
  80. AFMDIR=/opt/gnu/lib/ghostscript/fonts/
  81.  
  82. #
  83. # PostScript imager for server.  PSPACKAGE is one of:
  84. #
  85. # dps    for Display Postscript
  86. # gs    for Ghostscript
  87. #
  88. # and PSIMAGER is the pathname of the binary executable.
  89. #
  90. PSPACKAGE=gs
  91. PSIMAGER=/opt/gnu/bin/gs
  92.  
  93. #
  94. # Mail program for sending notification messages.
  95. #
  96. SENDMAIL=/usr/lib/sendmail
  97.  
  98. #
  99. # Default optimizer and prototype options
  100. #
  101. OPTIMIZER=-O
  102. PROTOTYPES=
  103. CVERSION= -D__ANSI_CPP__
  104. C++FILE=
  105.  
  106. # default definitions for programs--overide them as desired
  107. LIBS=    ${LIBUTIL} ${LIBTIFF} ${LIBIV} ${LIBPORT}
  108. LLDLIBS=${LIBS} ${MACHDEPLIBS}
  109. #
  110. # Override this definition to eliminate shared library use.
  111. #
  112. SHDLIBC=
  113.  
  114. #
  115. # Libraries that may vary from machine to machine (especially if
  116. # you use GNU GCC instead of AT&T C++).
  117. #
  118. # -lucb follows -lc only for strcasecmp strncasecmp mkstemp
  119. # -lelf required on Solaris 2; doesn't hurt to keep on other flavors
  120. MACHDEPLIBS= -lsocket -lnsl -lelf
  121. #
  122. # You must have v3.0 or newer of the TIFF library.  If
  123. # you already have it installed, or if you have version 3.0
  124. # or newer of InterViews installed (which includes the TIFF
  125. # library), you can point these to those places.  Otherwise,
  126. # you can just use the code provided here.
  127. #
  128. TIFF=    ${DEPTH}/libtiff
  129. LIBTIFF=${TIFF}/libtiff.a
  130. #
  131. # If you already have InterViews 3.0 or newer installed,
  132. # define these to be something like:
  133. #
  134. #IV=    /usr/include
  135. #LIBIV=    /usr/lib/libIV.a
  136. # Otherwise you can just use the subset of classes used by
  137. # the fax software and collected here in a hacked-up library.
  138. #
  139. IV=    ${DEPTH}/iv
  140. LIBIV=    ${IV}/libivhack.a
  141. # random utility functions and classes
  142. UTIL=    ${DEPTH}/util
  143. LIBUTIL=${UTIL}/libfaxutil.a
  144. LIBPORT=${PORT}/libport.a
  145.  
  146. #
  147. # Uid&Gid for installing server stuff.  Note that the server process
  148. # proper (/usr/etc/faxd or similar) must either run setuid root or
  149. # setuid uucp (i.e. fax and uucp must have the same uid).  This is
  150. # so that the fax server can participate in the UUCP locking scheme
  151. # and thereby implement tty line sharing (i.e. share the same line
  152. # and modem for both fax and data).
  153. #
  154. FAXUSER=uucp
  155. FAXGROUP=uucp
  156.  
  157. #
  158. # Directories where stuff gets placed:
  159. #
  160. # BIN        client-directed applications
  161. # LIBDATA    client-directed application library data files
  162. # LIBEXEC    client-directed application library executables
  163. # SPOOL        spooling area for servers
  164. # DOC        non-manual documentation
  165. # USRETC    place for servers (faxd & faxd.recv)
  166. #
  167. BIN=    /opt/fax/bin
  168. LIBDATA=/opt/fax/lib
  169. LIBEXEC=/opt/fax/lib
  170. DOC=    /opt/fax/doc
  171. USRETC=    /opt/fax/sbin
  172.  
  173. SPOOL=    /var/spool/fax
  174. #
  175. # Manual-related controls:
  176. #
  177. # MAN        head of manual tree
  178. # MANAPP    subdirectory for stuff in BIN
  179. # MANSYS    subdirectory for server & server-related apps
  180. # MANFILES    subdirectory for file format info 
  181. # PAGEDIRT    temp files to remove on clean/clobber
  182. #
  183. MAN    = /opt/fax/man
  184.  
  185. MANAPPS    = man1
  186. MANSYS    = man1
  187. MANFILES= man4
  188.  
  189. NROFF    = /usr/ucb/nroff
  190. COMPRESS= compress
  191.  
  192. MANCAPP    = ${CLIENTAPPS}
  193. MANCFILE= ${CLIENTFILES}
  194. MANSAPP    = ${SERVERAPPS}
  195. MANSFILE= ${SERVERFILES}
  196. PAGEDIRT=
  197.  
  198. # programs used during installation
  199. ECHO=    /bin/echo
  200. FTR=    /usr/sbin/ftr
  201. GREP=    /bin/grep
  202. RM=    /bin/rm
  203. KILLALL=/etc/killall
  204. PWD=    /bin/pwd
  205. CHROOT=    /etc/chroot
  206.  
  207. #
  208. # Definitions used by common rules.
  209. #
  210. COMMONRULES=${DEPTH}/rules
  211. COMMONTARGS= clobber clean rmtargets depend incdepend
  212.  
  213. #
  214. # C compiler flags are composed of variable (set on the command line),
  215. # local (defined in the makefile), and global (defined in this file)
  216. # parts, in that order.  This ordering is used so that variable or
  217. # locally specified include directories are searched before the globally
  218. # specified ones.
  219. #
  220. CFLAGS=    ${CVERSION} ${VCFLAGS} ${LCFLAGS} ${GCFLAGS}
  221.  
  222. VCFLAGS=${VCDEFS} ${VCINCS} ${VCOPTS}
  223. LCFLAGS=${LCDEFS} ${LCINCS} ${LCOPTS}
  224. GCFLAGS=${GCDEFS} ${GCINCS} ${GCOPTS}
  225.  
  226. COPTS=    ${VCOPTS} ${LCOPTS} ${GCOPTS}
  227. CDEFS=    ${VCDEFS} ${LCDEFS} ${GCDEFS}
  228. CINCS=    ${VCINCS} ${LCINCS} ${GCINCS}
  229.  
  230. GCOPTS=${OPTIMIZER} ${PROTOTYPES}
  231. GCDEFS=-Dsvr4
  232. GCINCS=    -I. -I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF}
  233. #
  234. # C++ flags are decomposed using the same hierarchy as C flags.
  235. #
  236. C++FLAGS=${CVERSION} ${VC++FLAGS} ${LC++FLAGS} ${GC++FLAGS}
  237.  
  238. VC++FLAGS=${VC++DEFS} ${VC++INCS} ${VC++OPTS}
  239. LC++FLAGS=${LC++DEFS} ${LC++INCS} ${LC++OPTS}
  240. GC++FLAGS=${GC++DEFS} ${GC++INCS} ${GC++OPTS}
  241.  
  242. C++OPTS=${VC++OPTS} ${LC++OPTS} ${GC++OPTS}
  243. C++DEFS=${VC++DEFS} ${LC++DEFS} ${GC++DEFS}
  244. C++INCS=${VC++INCS} ${LC++INCS} ${GC++INCS}
  245.  
  246. GC++OPTS=${OPTIMIZER}
  247. GC++INCS=-I. -I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF}
  248. GC++DEFS=-Dsvr4 '-DfxSIGACTIONHANDLER=(void(*)())'
  249.  
  250. #
  251. # Loader flags, composed of library (-l's) and option parts, with
  252. # the libraries appearing last.  Both of these are divided into variable,
  253. # local, and global parts.  The composition of LDFLAGS is done in the
  254. # other "direction" from CFLAGS so that all the -L's, that are part of
  255. # LDOPTS, appear before any of the -l's, which are part of LDLIBS.
  256. # Another benefit of segregating the libraries from the remaining of the
  257. # loader options is that the libraries alone can easily be given to
  258. # another program, e.g., lint.
  259. #
  260. # Notes:
  261. #   - If a program should not be linked with the shared version of libc,
  262. #     then its make file should override the setting of SHDLIBC with a
  263. #     line such as "SHDLIBC=".
  264. #
  265. LDFLAGS=${LDOPTS} ${LDLIBS}
  266.  
  267. LDOPTS=${VLDOPTS} ${LLDOPTS} ${GLDOPTS}
  268. LDLIBS=${VLDLIBS} ${LLDLIBS} ${GLDLIBS}
  269.  
  270. GLDOPTS=
  271. GLDLIBS=${SHDLIBC}
  272.  
  273. #
  274. # Convenient command macros that include the flags macros.
  275. #
  276. C++F=    ${C++} ${C++FLAGS}
  277. CCF=    ${CC} ${CFLAGS}
  278.  
  279. #
  280. # Shell script for generating make dependencies.  MKDEPEND is a shorthand
  281. # for the tool's absolute pathname.  MKDEPENDC adds MKDEPCFLAGS and the -c
  282. # mkdepend option to this.  The other language's mkdepend variables try to
  283. # include their language's name in the variable names.  Unfortunately, a
  284. # lot of makefiles already use the nondescript LMKDEPFLAGS for C language
  285. # mkdepend options, so we initialize LMKDEPCFLAGS with ${LMKDEPFLAGS}.
  286. #
  287. MKDEPENDC++    =${MKDEPEND} ${MKDEPC++FLAGS} -c "true"
  288. MKDEPENDC    =${MKDEPEND} ${MKDEPCFLAGS} -c "true"
  289.  
  290. MKDEPC++FLAGS    =${VMKDEPC++FLAGS} ${LMKDEPC++FLAGS} ${GMKDEPC++FLAGS}
  291. MKDEPCFLAGS    =${VMKDEPCFLAGS} ${LMKDEPCFLAGS} ${GMKDEPCFLAGS}
  292. LMKDEPCFLAGS    =${LMKDEPFLAGS}
  293.  
  294. GMKDEPFLAGS    =-e 's@ ${INCLDIR}/@ $${INCLDIR}/@' -e 's@ ${ROOT}/@ $${ROOT}/@'
  295. GMKDEPC++FLAGS    =${GMKDEPFLAGS} -s C++ -e 's@\.c++\.o *: @\.o: @'
  296. GMKDEPCFLAGS    =${GMKDEPFLAGS}
  297.  
  298. #
  299. # Macro to add to LMKDEPCFLAGS or LMKDEPC++FLAGS if your makefile builds
  300. # single-source programs using null suffix rules (e.g., .c:}.  This option
  301. # works for both C and C++ make depend.
  302. #
  303. NULLSUFFIX_MKDEPFLAG=-e 's@\.o+*:@:@'
  304. #
  305. # MKDEPFILE is the name of the dependency database, included by rules.
  306. #
  307. MKDEPFILE=Makedepend
  308. #
  309. # CDEPFILES lists all C or cc-compiled source files that depend on header
  310. # files computable by ${MKDEPENDC}.  C++DEPFILES lists all C++ files having
  311. # dependencies computable by ${MKDEPENDC++}.
  312. #
  313. C++DEPFILES=${C++FILES}
  314. CDEPFILES=${CFILES}
  315. DEPFILES=${C++DEPFILES} ${CDEPFILES}
  316.  
  317. #
  318. # Directory shorthands, mainly for make depend (see GMKDEPFLAGS above).
  319. #
  320. INCLDIR    =${ROOT}/usr/include
  321.